﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utility1;

namespace eDream.Page
{
    public partial class Goc_tu_van : System.Web.UI.UserControl
    {
        public string pathUrl = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            pathUrl = WebUtils.pathUrl();
            if (!IsPostBack)
                LoadData();
        }

        private void LoadData()
        {
            DataClasses1DataContext dx = new DataClasses1DataContext();
            try
            {
                dx.Connection.Open();
                var list = from k in dx.New_s
                           where k.flag==true && k.cateID==1
                           select k;
                rptResult.DataSource = list;
                rptResult.DataBind();
            }
            catch (Exception) { }
            finally { dx.Connection.Close(); }
        }
    }
}